﻿#region itdc

/************************************************************************
*Copyright(C) 2015 by qsgy
 *All rights reserved. 
 *FileName:     $safeitemname$
 *Author:       oyh
 *Version:      
 *UnityVersion：
 *Date:   $time$      
 *Description:    
 *History: 
************************************************************************/
#endregion
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InitialGame : MonoBehaviour {
    public Transform buid;
    public Transform clip;
    private void Awake()
    {
   
    }

    private IEnumerator Start()
    {
        yield return 1;
       // Application.ExternalCall("InitialGame", buid.position.x, buid.position.y, buid.position.z,
      // clip.position.x, clip.position.y, clip.position.z);
        ByteBuffer bf = ByteBuffer.Allocate(32);
        bf.WriteShort(30);
        bf.WriteUTF("init");//6+4*6=30
        bf.WriteFloat(buid.position.x);
        bf.WriteFloat(buid.position.y);
        bf.WriteFloat(buid.position.z);
        bf.WriteFloat(clip.position.x);
        bf.WriteFloat(clip.position.y);
        bf.WriteFloat(clip.position.z);



        SocketFace.instance.SendBuf(bf);
    }
}
